﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ToolS
{
    public class Init
    {
        public static string workPath = "d:/Tools";
        public static void InitWorkDirectory()
        {
            
            if (!Directory.Exists(workPath))
            {
                Directory.CreateDirectory(workPath);
            }

            if(!Directory.Exists(workPath+"/requests"))
            {
                Directory.CreateDirectory(workPath + "/requests");
            }

            if(!File.Exists(workPath+"/WorkSettings.xml"))
            {
                //保存一个默认的
                RequestEntityHelper.SaveWorkSetting(new WorkSettings());
            }
        }
    }
}
